import request from '@/utils/request'

export function getList(params) {
  return request({
    url: '/moments',
    method: 'get',
    params
  })
}

export function create(params) {
  return request({
    url: '/moments',
    method: 'post',
    data: params
  })
}

export function updateStatus(id, status) {
  return request({
    url: '/moments/' + id + '/status/' + status,
    method: 'put'
  })
}
export function update(id, params) {
  return request({
    url: '/moments/' + id,
    method: 'put',
    data: params
  })
}

export function find(id) {
  return request({
    url: '/moments/' + id,
    method: 'get'
  })
}
